package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Student generated by hbm2java
 */
@Entity
@Table(name = "student")
public class Student implements java.io.Serializable {

	private long id;
	private StudentClass studentClass;
	private AirLine airLine;
	private UserBaseInfo userBaseInfo;
	private StudentType studentType;
	private String number;
	private Date inDate;
	private Date outDate;
	private String qualifledType;
	private Date qualifiedDate;
	private String trainingNum;
	private boolean complete;
	private boolean stopFly;
	private boolean englishOnly;
	private Long lowAcademy;
	private Long middelAcademy;
	private Long highAcademy;
	private String grade;
	private String childClass;
	private boolean mplStudent;
	private Set<Topic> topics = new HashSet<Topic>(0);
	private TheoreticalGrade theoreticalGrade;
	private EnglishGrade englishGrade;
	private Set<StudentQualification> studentQualifications = new HashSet<StudentQualification>(
			0);
	private Set<StopFly> stopFlies = new HashSet<StopFly>(0);
	private ConductGrade conductGrade;
	private LicenceTheoreticalGrade licenceTheoreticalGrade;
	private Set<MainpointCertificate> mainpointCertificates = new HashSet<MainpointCertificate>(
			0);

	public Student() {
	}

	public Student(UserBaseInfo userBaseInfo, boolean complete,
			boolean stopFly, boolean englishOnly, boolean mplStudent) {
		this.userBaseInfo = userBaseInfo;
		this.complete = complete;
		this.stopFly = stopFly;
		this.englishOnly = englishOnly;
		this.mplStudent = mplStudent;
	}

	public Student(StudentClass studentClass, AirLine airLine,
			UserBaseInfo userBaseInfo, StudentType studentType, String number,
			Date inDate, Date outDate, String qualifledType,
			Date qualifiedDate, String trainingNum, boolean complete,
			boolean stopFly, boolean englishOnly, Long lowAcademy,
			Long middelAcademy, Long highAcademy, String grade,
			String childClass, boolean mplStudent, Set<Topic> topics,
			TheoreticalGrade theoreticalGrade, EnglishGrade englishGrade,
			Set<StudentQualification> studentQualifications,
			Set<StopFly> stopFlies, ConductGrade conductGrade,
			LicenceTheoreticalGrade licenceTheoreticalGrade,
			Set<MainpointCertificate> mainpointCertificates) {
		this.studentClass = studentClass;
		this.airLine = airLine;
		this.userBaseInfo = userBaseInfo;
		this.studentType = studentType;
		this.number = number;
		this.inDate = inDate;
		this.outDate = outDate;
		this.qualifledType = qualifledType;
		this.qualifiedDate = qualifiedDate;
		this.trainingNum = trainingNum;
		this.complete = complete;
		this.stopFly = stopFly;
		this.englishOnly = englishOnly;
		this.lowAcademy = lowAcademy;
		this.middelAcademy = middelAcademy;
		this.highAcademy = highAcademy;
		this.grade = grade;
		this.childClass = childClass;
		this.mplStudent = mplStudent;
		this.topics = topics;
		this.theoreticalGrade = theoreticalGrade;
		this.englishGrade = englishGrade;
		this.studentQualifications = studentQualifications;
		this.stopFlies = stopFlies;
		this.conductGrade = conductGrade;
		this.licenceTheoreticalGrade = licenceTheoreticalGrade;
		this.mainpointCertificates = mainpointCertificates;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "userBaseInfo"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_CLASS")
	public StudentClass getStudentClass() {
		return this.studentClass;
	}

	public void setStudentClass(StudentClass studentClass) {
		this.studentClass = studentClass;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AIRLINE_COMPANY")
	public AirLine getAirLine() {
		return this.airLine;
	}

	public void setAirLine(AirLine airLine) {
		this.airLine = airLine;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public UserBaseInfo getUserBaseInfo() {
		return this.userBaseInfo;
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STUDENT_TYPE")
	public StudentType getStudentType() {
		return this.studentType;
	}

	public void setStudentType(StudentType studentType) {
		this.studentType = studentType;
	}

	@Column(name = "NUMBER", length = 30)
	public String getNumber() {
		return this.number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "IN_DATE", length = 19)
	public Date getInDate() {
		return this.inDate;
	}

	public void setInDate(Date inDate) {
		this.inDate = inDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OUT_DATE", length = 19)
	public Date getOutDate() {
		return this.outDate;
	}

	public void setOutDate(Date outDate) {
		this.outDate = outDate;
	}

	@Column(name = "QUALIFLED_TYPE", length = 10)
	public String getQualifledType() {
		return this.qualifledType;
	}

	public void setQualifledType(String qualifledType) {
		this.qualifledType = qualifledType;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "QUALIFIED_DATE", length = 19)
	public Date getQualifiedDate() {
		return this.qualifiedDate;
	}

	public void setQualifiedDate(Date qualifiedDate) {
		this.qualifiedDate = qualifiedDate;
	}

	@Column(name = "TRAINING_NUM", length = 20)
	public String getTrainingNum() {
		return this.trainingNum;
	}

	public void setTrainingNum(String trainingNum) {
		this.trainingNum = trainingNum;
	}

	@Column(name = "COMPLETE", nullable = false)
	public boolean isComplete() {
		return this.complete;
	}

	public void setComplete(boolean complete) {
		this.complete = complete;
	}

	@Column(name = "STOP_FLY", nullable = false)
	public boolean isStopFly() {
		return this.stopFly;
	}

	public void setStopFly(boolean stopFly) {
		this.stopFly = stopFly;
	}

	@Column(name = "ENGLISH_ONLY", nullable = false)
	public boolean isEnglishOnly() {
		return this.englishOnly;
	}

	public void setEnglishOnly(boolean englishOnly) {
		this.englishOnly = englishOnly;
	}

	@Column(name = "LOW_ACADEMY")
	public Long getLowAcademy() {
		return this.lowAcademy;
	}

	public void setLowAcademy(Long lowAcademy) {
		this.lowAcademy = lowAcademy;
	}

	@Column(name = "MIDDEL_ACADEMY")
	public Long getMiddelAcademy() {
		return this.middelAcademy;
	}

	public void setMiddelAcademy(Long middelAcademy) {
		this.middelAcademy = middelAcademy;
	}

	@Column(name = "HIGH_ACADEMY")
	public Long getHighAcademy() {
		return this.highAcademy;
	}

	public void setHighAcademy(Long highAcademy) {
		this.highAcademy = highAcademy;
	}

	@Column(name = "GRADE", length = 20)
	public String getGrade() {
		return this.grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	@Column(name = "CHILD_CLASS")
	public String getChildClass() {
		return this.childClass;
	}

	public void setChildClass(String childClass) {
		this.childClass = childClass;
	}

	@Column(name = "MPL_STUDENT", nullable = false)
	public boolean isMplStudent() {
		return this.mplStudent;
	}

	public void setMplStudent(boolean mplStudent) {
		this.mplStudent = mplStudent;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "student_topic", joinColumns = { @JoinColumn(name = "STUDENT_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "TOPIC_ID", nullable = false, updatable = false) })
	public Set<Topic> getTopics() {
		return this.topics;
	}

	public void setTopics(Set<Topic> topics) {
		this.topics = topics;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "student")
	public TheoreticalGrade getTheoreticalGrade() {
		return this.theoreticalGrade;
	}

	public void setTheoreticalGrade(TheoreticalGrade theoreticalGrade) {
		this.theoreticalGrade = theoreticalGrade;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "student")
	public EnglishGrade getEnglishGrade() {
		return this.englishGrade;
	}

	public void setEnglishGrade(EnglishGrade englishGrade) {
		this.englishGrade = englishGrade;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "student")
	public Set<StudentQualification> getStudentQualifications() {
		return this.studentQualifications;
	}

	public void setStudentQualifications(
			Set<StudentQualification> studentQualifications) {
		this.studentQualifications = studentQualifications;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "student")
	public Set<StopFly> getStopFlies() {
		return this.stopFlies;
	}

	public void setStopFlies(Set<StopFly> stopFlies) {
		this.stopFlies = stopFlies;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "student")
	public ConductGrade getConductGrade() {
		return this.conductGrade;
	}

	public void setConductGrade(ConductGrade conductGrade) {
		this.conductGrade = conductGrade;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "student")
	public LicenceTheoreticalGrade getLicenceTheoreticalGrade() {
		return this.licenceTheoreticalGrade;
	}

	public void setLicenceTheoreticalGrade(
			LicenceTheoreticalGrade licenceTheoreticalGrade) {
		this.licenceTheoreticalGrade = licenceTheoreticalGrade;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "student")
	public Set<MainpointCertificate> getMainpointCertificates() {
		return this.mainpointCertificates;
	}

	public void setMainpointCertificates(
			Set<MainpointCertificate> mainpointCertificates) {
		this.mainpointCertificates = mainpointCertificates;
	}

}
